import {simpleServer} from '../../tools/servers'

/**
 * 登录
 */
export class LoginService {
  // 登录
  static loginSubmit (data) {
    var body = simpleServer.getArgs(this.loginSubmit,arguments,'POST');
    return simpleServer.connection('POST', 'Login/loginSubmit', body);
  }

  // 测试
  static test () {
    return simpleServer.connection('GET', 'Login/test', null);
  }

  // 登录
  static constructNewTree(operatorId,moduleType)
  {
    var body = simpleServer.getArgs(this.constructNewTree,arguments,'GET');
    return simpleServer.connection('GET', '/Login/constructNewTree', body);
  }

  //退出登录
  static logout () {
    var body = simpleServer.getArgs(this.loginSubmit,arguments,'GET');
    return simpleServer.connection('GET', 'Login/logout', body);
  }
}
